import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
import News from '../views/News'
import Sports from '../views/Sports'
import SportsNews from '../views/second/SportsNews'
import NationSports from '../views/second/NationSports'
import OutSports from '../views/second/OutSports'

Vue.use(VueRouter)

const routes = [
    {
        path:'/',
        redirect: '/home'
    },
    {
        path:'/home',
        component: Home,
    },
    {
        path:'/news',
        component: News,
    },
    {
        path:'/sports',
        component: Sports,
        redirect:'/sports/sportsNews',
        children:[
            {
                path:'sportsNews',
                component:SportsNews
            },
            {
                path:'nationSports',
                component:NationSports
            },
            {
                path:'outSports',
                component:OutSports
            },
        ]            
        
    },
]

const router = new VueRouter({
    routes
})

export default router